using AForge.Imaging;
using AForge.Video;
using AForge.Vision.Motion;
using log4net;
using log4net.Config;
using SilverSea.LPRProcessing;
using SilverSea.Registration;
using SilverSea.Untilities;
using SilverSea.Video.Tools;
using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
public sealed class MainForm : Form
{
	private delegate void Delegate1(ExtendCollection4 ExtendCollection4_0);
	public static SystemConfiguration SystemConfiguration_0 = new SystemConfiguration();
	private static ILPRProcessing ilprprocessing_0 = null;
	private BackgroundWorker backgroundWorker_0;
	private System.Collections.Queue queue_0 = new System.Collections.Queue();
	private string string_0 = string.Empty;
	private System.Windows.Forms.Timer timer_0 = new System.Windows.Forms.Timer();
	private System.Windows.Forms.Timer timer_1 = new System.Windows.Forms.Timer();
	private string string_1 = string.Empty;
	private MotionDetector motionDetector_0;
	private System.Windows.Forms.Timer timer_2 = new System.Windows.Forms.Timer();
	private int int_0;
	private MotionDetector motionDetector_1;
	private System.Windows.Forms.Timer timer_3 = new System.Windows.Forms.Timer();
	private int int_1;
	private BackgroundWorker backgroundWorker_1;
	private BackgroundWorker backgroundWorker_2;
	private System.Drawing.Color color_0 = System.Drawing.Color.Green;
	private System.Drawing.Color color_1 = System.Drawing.Color.Green;
	private bool bool_0 = true;
	private int int_2;
	private System.Windows.Forms.Timer timer_4 = new System.Windows.Forms.Timer();
	private int int_3;
	private System.Windows.Forms.Timer timer_5 = new System.Windows.Forms.Timer();
	private BackgroundWorker backgroundWorker_3;
	public static System.Collections.Queue queue_1 = new System.Collections.Queue();
	private System.Windows.Forms.Timer timer_6 = new System.Windows.Forms.Timer();
	private BackgroundWorker backgroundWorker_4;
	protected PerformanceCounter performanceCounter_0;
	protected PerformanceCounter performanceCounter_1;
	private bool bool_1;
	private string string_2 = "HỆ THỐNG PHÁT HIỆN VI PHẠM VƯỢT ĐÈN ĐỎ";
	private ILog ilog_0 = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
	private int int_4;
	private IContainer icontainer_0;
	private MenuStrip menuStrip1;
	private ToolStripMenuItem msSystem;
	private ToolStripMenuItem miCameraConfig;
	private ToolStripMenuItem miMotionConfig;
	private ToolStripMenuItem miOption;
	private ToolStripSeparator toolStripSeparator1;
	private ToolStripMenuItem miExit;
	private ToolStripMenuItem msReport;
	private ToolStripMenuItem miViolationReport;
	private ToolStripMenuItem msHelp;
	private ToolStripMenuItem miHelp;
	private ToolStripMenuItem miRegistration;
	private ToolStripMenuItem miAbout;
	private StatusStrip statusStrip1;
	private ToolStripStatusLabel tsCamera1;
	private ToolStripStatusLabel toolStripStatusLabel2;
	private ToolStripStatusLabel tsQueue;
	private ToolStripStatusLabel tsDateTime;
	private Panel panelCamera;
	private Label lblVehicleCamera1;
	private Panel panelResult;
	private PictureBox picPlateImage;
	private Label lblPlateNumber;
	private Label label9;
	private Label lblPanoramaImage;
	private PictureBox picPanoramaImage;
	private DataGridView dataGridView1;
	private System.Windows.Forms.Timer timer_7;
	private Label labelRedLightCamera;
	private Label lblVehicleImage;
	private PictureBox picVehicleImage;
	private ToolStripMenuItem miVehicleCamera1Config;
	private ToolStripMenuItem miRedLightCameraConfig;
	private ToolStripMenuItem miVehicleCamera1MotionConfig;
	private ToolStripMenuItem miRedLightCameraMotionConfig;
	private PictureBox picTrafficLight;
	private ToolStripStatusLabel cpuCounterPanel;
	private ToolStripStatusLabel ramCounterPanel;
	private ToolStripStatusLabel tsCamera2;
	private Label label10;
	private Label lblVehicleCamera2;
	private Label lblRedLightImage;
	private PictureBox picRedLightImage;
	private ToolStripMenuItem miVehicleCamera2Config;
	private ToolStripMenuItem miVehicleCamera2MotionConfig;
	private ToolStripStatusLabel tsCamera3;
	private ToolStripMenuItem miUserConfig;
	private ToolStripMenuItem miLogin;
	private ToolStripMenuItem miLogout;
	private ToolStripSeparator toolStripSeparator2;
	private ToolStripSeparator toolStripSeparator3;
	private ToolStripMenuItem miPanoramaCameraConfig;
	private ToolStripMenuItem miPanoramaCameraMotionConfig;
	private Label lblPanoramaCamera;
	private GroupBox groupBox1;
	private ToolStripStatusLabel tsCamera4;
	private CheckBox chkRedLightSimulation;
	private Label lblRGBInfo;
	private ToolStripMenuItem msData;
	private ToolStripMenuItem miVehicle;
	private ToolStripSeparator toolStripSeparator5;
	private ToolStripMenuItem miChangePassword;
	private ToolStripSeparator toolStripSeparator4;
	private ToolStripMenuItem miListDeleted;
	private ToolStripMenuItem miBlackList;
	private ToolStripMenuItem miSpecialList;
	private Panel panelRedLightCamera;
	private Panel panelVehicleCamera2;
	private Panel panelPanoramaCamera;
	private Panel panelVehicleCamera1;
	private DataGridViewTextBoxColumn IDColumn;
	private DataGridViewTextBoxColumn DateColumn;
	private DataGridViewTextBoxColumn TimeColumn;
	private DataGridViewTextBoxColumn PlateNumberColumn;
	private DataGridViewTextBoxColumn RecognizeTimeColumn;
	private DataGridViewTextBoxColumn VehicleImagePathColumn;
	private DataGridViewTextBoxColumn PanoramaImagePathColumn;
	private DataGridViewTextBoxColumn RedLightImagePathColumn;
	private ToolStripSeparator toolStripSeparator6;
    private IContainer components;
	private ToolStripMenuItem miSummaryReport;
	public MainForm()
	{
		this.InitializeComponent();
		BasicConfigurator.Configure();
		XmlConfigurator.Configure();
		MainForm.SystemConfiguration_0.method_7();
		MainForm.SystemConfiguration_0.method_5();
		MainForm.SystemConfiguration_0.method_9();
		MainForm.SystemConfiguration_0.method_22();
		MainForm.ilprprocessing_0 = new SimpleLPRProcessing();
		MainForm.ilprprocessing_0.MinCharHeight = MainForm.SystemConfiguration_0.int_13;
		MainForm.ilprprocessing_0.MaxCharHeight = MainForm.SystemConfiguration_0.int_14;
		MainForm.ilprprocessing_0.CountryCode = MainForm.SystemConfiguration_0.string_4;
		MainForm.ilprprocessing_0.ProvinceCode = MainForm.SystemConfiguration_0.string_6;
		MainForm.ilprprocessing_0.EnableMotorUnder50cc = false;
		MainForm.ilprprocessing_0.CreateLPREngine();
		this.miUserConfig.Enabled = false;
		this.miLogout.Enabled = false;
		this.miChangePassword.Enabled = false;
		this.miCameraConfig.Enabled = false;
		this.miMotionConfig.Enabled = false;
		this.miOption.Enabled = false;
		this.msReport.Enabled = false;
		this.miViolationReport.Enabled = false;
		this.miVehicle.Enabled = false;
		this.miListDeleted.Enabled = false;
		this.msData.Enabled = false;
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			this.miVehicleCamera2Config.Visible = true;
			this.lblVehicleCamera2.Visible = true;
			this.tsCamera2.Visible = true;
		}
		else
		{
			this.miVehicleCamera2Config.Visible = false;
			this.lblVehicleCamera2.Visible = false;
			this.tsCamera2.Visible = false;
		}
		this.timer_4.Interval = 100;
		this.timer_4.Tick += new System.EventHandler(this.timer_4_Tick);
		System.Drawing.Color backColor = System.Drawing.Color.FromName(MainForm.SystemConfiguration_0.string_15);
		this.panelCamera.BackColor = backColor;
		this.panelResult.BackColor = backColor;
		this.string_2 = MainForm.SystemConfiguration_0.m_Title;
		if (MainForm.SystemConfiguration_0.string_11 != string.Empty)
		{
			this.string_2 = this.string_2 + " - " + MainForm.SystemConfiguration_0.string_11;
		}
		if (MainForm.SystemConfiguration_0.string_12 != string.Empty)
		{
			this.string_2 = this.string_2 + " - " + MainForm.SystemConfiguration_0.string_12;
		}
		else
		{
			this.string_2 += " - NGUYỄN THANH TOÀN";
		}
		this.Text = this.string_2;
		this.cpuCounterPanel.Visible = MainForm.SystemConfiguration_0.bool_3;
		this.ramCounterPanel.Visible = MainForm.SystemConfiguration_0.bool_3;
		if (MainForm.SystemConfiguration_0.bool_3)
		{
			try
			{
				this.performanceCounter_0 = new PerformanceCounter();
				this.performanceCounter_1 = new PerformanceCounter();
				this.performanceCounter_0.CategoryName = "Processor";
				this.performanceCounter_0.CounterName = "% Processor Time";
				this.performanceCounter_0.InstanceName = "_Total";
				this.performanceCounter_1.CategoryName = "Memory";
				this.performanceCounter_1.CounterName = "Available MBytes";
			}
			catch (System.Exception ex)
			{
				MainForm.SystemConfiguration_0.bool_3 = false;
				MainForm.SystemConfiguration_0.method_8();
				this.ilog_0.Error(ex);
			}
		}
		this.ilog_0.Info("program started");
	}
	private void MainForm_Load(object sender, System.EventArgs e)
	{
		this.method_25();
		this.method_20();
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			this.method_21();
		}
		this.method_23();
		this.method_0();
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			this.method_1();
		}
		this.InitCamera2();
		this.method_2();
		this.method_8();
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			this.method_9();
		}
		this.method_10();
		this.method_35();
		if (MainForm.SystemConfiguration_0.int_18 > 0)
		{
			this.timer_6.Interval = MainForm.SystemConfiguration_0.int_18;
		}
		else
		{
			this.timer_6.Interval = 10;
		}
		this.timer_6.Tick += new System.EventHandler(this.timer_6_Tick);
		this.timer_6.Start();
		System.DateTime dateTime = System.DateTime.Now.Date.AddDays(-14.0);
		MainForm.SystemConfiguration_0.iconnection_0.ExecuteCommand(string.Concat(new object[]
		{
			"delete from tblEvent where EventDateTime < #",
			dateTime,
			"# and CheckDelete = ",
			true,
			" "
		}));
		this.string_1 = MainForm.SystemConfiguration_0.method_3();
	}
	private void method_0()
	{
		MainForm.SystemConfiguration_0.camera_0.CameraError += new CameraErrorEventHandler(this.method_16);
		MainForm.SystemConfiguration_0.camera_0.Start();
		MainForm.SystemConfiguration_0.camera_0.StopRecording();
		if (MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer).Name = "videoSourcePlayer1";
			((Control)MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer).DoubleClick += new System.EventHandler(this.method_29);
			((Control)MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer).Dock = DockStyle.Fill;
			this.panelVehicleCamera1.Controls.Add((Control)MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer);
		}
	}
	private void method_1()
	{
		MainForm.SystemConfiguration_0.ZoomCamera.CameraError += new CameraErrorEventHandler(this.method_16);
		MainForm.SystemConfiguration_0.ZoomCamera.Start();
		MainForm.SystemConfiguration_0.ZoomCamera.StopRecording();
		if (MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer).Name = "videoSourcePlayer2";
			((Control)MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer).DoubleClick += new System.EventHandler(this.ShowZoomCamera);
			((Control)MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer).Dock = DockStyle.Fill;
			this.panelVehicleCamera2.Controls.Add((Control)MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer);
		}
	}
	private void method_2()
	{
		MainForm.SystemConfiguration_0.ViewCamera.NewFrame += new NewFrameEventHandler(this.method_17);
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			MainForm.SystemConfiguration_0.ViewCamera.NewFrame += new NewFrameEventHandler(this.method_18);
		}
        MainForm.SystemConfiguration_0.ViewCamera.EnableMotionDetection = false;
		MainForm.SystemConfiguration_0.ViewCamera.DisplayMotionRegion = true;
		MainForm.SystemConfiguration_0.ViewCamera.CameraError += new CameraErrorEventHandler(this.method_16);
		MainForm.SystemConfiguration_0.ViewCamera.Start();
		MainForm.SystemConfiguration_0.ViewCamera.StopRecording();
		if (MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer).Name = "videoSourcePlayer4";
			((Control)MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer).DoubleClick += new System.EventHandler(this.ShowViewCamera);
			((Control)MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer).Dock = DockStyle.Fill;
			this.panelPanoramaCamera.Controls.Add((Control)MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer);
		}
	}
	private void InitCamera2()
	{
        MainForm.SystemConfiguration_0.RedLightCamera.DisplayMotionRegion = true;
		MainForm.SystemConfiguration_0.RedLightCamera.MotionRegions = MainForm.SystemConfiguration_0.RedLightCamera.GetMotionRegions(new System.Drawing.Rectangle[]
		{
			MainForm.SystemConfiguration_0.rectangle_0
		});
        MainForm.SystemConfiguration_0.RedLightCamera.EnableMotionDetection = true;
		MainForm.SystemConfiguration_0.RedLightCamera.CameraError += new CameraErrorEventHandler(this.method_16);
		MainForm.SystemConfiguration_0.RedLightCamera.Start();
		MainForm.SystemConfiguration_0.RedLightCamera.StopRecording();
		if (MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer).Name = "videoSourcePlayer3";
			((Control)MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer).DoubleClick += new System.EventHandler(this.ShowRedLightCamera);
			((Control)MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer).Dock = DockStyle.Fill;
			this.panelRedLightCamera.Controls.Add((Control)MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer);
		}
	}
	private void method_4()
	{
		MainForm.SystemConfiguration_0.camera_0.CameraError -= new CameraErrorEventHandler(this.method_16);
		if (MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer).DoubleClick -= new System.EventHandler(this.method_29);
			this.panelVehicleCamera1.Controls.Remove((Control)MainForm.SystemConfiguration_0.camera_0.videoSourcePlayer);
		}
		MainForm.SystemConfiguration_0.camera_0.Stop();
	}
	private void method_5()
	{
		MainForm.SystemConfiguration_0.ZoomCamera.CameraError -= new CameraErrorEventHandler(this.method_16);
		if (MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer).DoubleClick -= new System.EventHandler(this.ShowZoomCamera);
			this.panelVehicleCamera2.Controls.Remove((Control)MainForm.SystemConfiguration_0.ZoomCamera.videoSourcePlayer);
		}
		MainForm.SystemConfiguration_0.ZoomCamera.Stop();
	}
	private void method_6()
	{
		MainForm.SystemConfiguration_0.ViewCamera.CameraError -= new CameraErrorEventHandler(this.method_16);
		MainForm.SystemConfiguration_0.ViewCamera.NewFrame -= new NewFrameEventHandler(this.method_17);
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			MainForm.SystemConfiguration_0.ViewCamera.NewFrame -= new NewFrameEventHandler(this.method_18);
		}
		if (MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer).DoubleClick -= new System.EventHandler(this.ShowViewCamera);
			this.panelPanoramaCamera.Controls.Remove((Control)MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer);
		}
		MainForm.SystemConfiguration_0.ViewCamera.Stop();
	}
	private void method_7()
	{
		MainForm.SystemConfiguration_0.RedLightCamera.CameraError -= new CameraErrorEventHandler(this.method_16);
		if (MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer != null)
		{
			((Control)MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer).DoubleClick -= new System.EventHandler(this.ShowRedLightCamera);
			this.panelRedLightCamera.Controls.Remove((Control)MainForm.SystemConfiguration_0.RedLightCamera.videoSourcePlayer);
		}
		MainForm.SystemConfiguration_0.RedLightCamera.Stop();
	}
	private void method_8()
	{
		try
		{
			this.motionDetector_0 = new MotionDetector(new TwoFramesDifferenceDetector(MainForm.SystemConfiguration_0.ViewCamera.SuppressNoise), null);
			if (MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles != null && MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles.Length > 0)
			{
				if (!MainForm.SystemConfiguration_0.bool_0)
				{
					System.Drawing.Rectangle[] motionZones = new System.Drawing.Rectangle[]
					{
						MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles[0]
					};
                    this.motionDetector_0.MotionZones = motionZones;
				}
				else
				{
					this.motionDetector_0.MotionZones = MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles;
				}
			}
			this.timer_2.Interval = 100;
			this.timer_2.Tick += new System.EventHandler(this.timer_2_Tick);
			this.timer_2.Start();
			if (MainForm.SystemConfiguration_0.int_0 > 0)
			{
				this.timer_0.Interval = MainForm.SystemConfiguration_0.int_0;
				this.timer_0.Tick += new System.EventHandler(this.timer_0_Tick);
				this.timer_0.Start();
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void method_9()
	{
		try
		{
			this.motionDetector_1 = new MotionDetector(new TwoFramesDifferenceDetector(MainForm.SystemConfiguration_0.ViewCamera.SuppressNoise), null);
			if (MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles != null && MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles.Length > 1)
			{
				if (!MainForm.SystemConfiguration_0.bool_1)
				{
					System.Drawing.Rectangle[] motionZones = new System.Drawing.Rectangle[]
					{
						MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles[1]
					};
                    this.motionDetector_1.MotionZones = motionZones;
				}
				else
				{
                    this.motionDetector_1.MotionZones = MainForm.SystemConfiguration_0.ViewCamera.MotionRectangles;
				}
			}
			this.timer_3.Interval = 100;
			this.timer_3.Tick += new System.EventHandler(this.timer_3_Tick);
			this.timer_3.Start();
			if (MainForm.SystemConfiguration_0.int_1 > 0)
			{
				this.timer_1.Interval = MainForm.SystemConfiguration_0.int_1;
				this.timer_1.Tick += new System.EventHandler(this.timer_1_Tick);
				this.timer_1.Start();
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void method_10()
	{
		if (MainForm.SystemConfiguration_0.int_4 > 0)
		{
			this.timer_5.Interval = MainForm.SystemConfiguration_0.int_4;
			this.timer_5.Tick += new System.EventHandler(this.timer_5_Tick);
			this.timer_5.Start();
		}
	}
	private void method_11()
	{
		this.timer_0.Tick -= new System.EventHandler(this.timer_0_Tick);
		this.timer_0.Stop();
		this.timer_2.Tick -= new System.EventHandler(this.timer_2_Tick);
		this.timer_2.Stop();
		if (this.motionDetector_0 != null)
		{
			this.motionDetector_0.Reset();
			this.motionDetector_0 = null;
		}
	}
	private void method_12()
	{
		this.timer_1.Tick -= new System.EventHandler(this.timer_1_Tick);
		this.timer_1.Stop();
		this.timer_3.Tick -= new System.EventHandler(this.timer_3_Tick);
		this.timer_3.Stop();
		if (this.motionDetector_1 != null)
		{
			this.motionDetector_1.Reset();
			this.motionDetector_1 = null;
		}
	}
	private void method_13()
	{
		this.timer_5.Tick -= new System.EventHandler(this.timer_5_Tick);
		this.timer_5.Stop();
	}
	private void method_14()
	{
		this.queue_0.Clear();
		this.method_13();
		this.method_11();
		this.method_12();
		this.timer_7.Stop();
		this.method_4();
		this.method_5();
		this.method_7();
		this.method_6();
		this.timer_6.Tick -= new System.EventHandler(this.timer_6_Tick);
		this.timer_6.Stop();
		this.method_15();
		MainForm.ilprprocessing_0.CloseLPREngine();
		MainForm.SystemConfiguration_0.iconnection_0.Close();
		SystemUntils.SetCurrentSystemSetting();
	}
	private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
	{
		if (MessageBox.Show("Bạn có thực sự muốn đóng chương trình ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
		{
			e.Cancel = true;
			return;
		}
		if (RegisterationInfo.gclass2_0 == null)
		{
			frmLogin frmLogin = new frmLogin();
			while (frmLogin.ShowDialog() == DialogResult.OK)
			{
                BO5 gClass = MainForm.SystemConfiguration_0.ExtendCollection_0.Search3(frmLogin.method_0(), frmLogin.method_1());
				if (gClass != null)
				{
					this.ilog_0.Info("User: " + gClass.method_2() + " close app.");
					this.method_14();
					return;
				}
			}
			e.Cancel = true;
			return;
		}
		this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " close app.");
		this.method_14();
	}
	public void method_15()
	{
		if (this.backgroundWorker_0 != null)
		{
			this.backgroundWorker_0.DoWork -= new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
			this.backgroundWorker_0.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(this.backgroundWorker_0_RunWorkerCompleted);
			this.backgroundWorker_0.ProgressChanged -= new ProgressChangedEventHandler(this.backgroundWorker_0_ProgressChanged);
			this.backgroundWorker_0.CancelAsync();
			this.backgroundWorker_0 = null;
		}
		if (this.backgroundWorker_1 != null)
		{
			this.backgroundWorker_1.DoWork -= new DoWorkEventHandler(this.backgroundWorker_1_DoWork);
			this.backgroundWorker_1.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(this.backgroundWorker_1_RunWorkerCompleted);
			this.backgroundWorker_1.ProgressChanged -= new ProgressChangedEventHandler(this.backgroundWorker_1_ProgressChanged);
			this.backgroundWorker_1.CancelAsync();
			this.backgroundWorker_1 = null;
		}
		if (this.backgroundWorker_2 != null)
		{
			this.backgroundWorker_2.DoWork -= new DoWorkEventHandler(this.backgroundWorker_2_DoWork);
			this.backgroundWorker_2.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(this.backgroundWorker_2_RunWorkerCompleted);
			this.backgroundWorker_2.ProgressChanged -= new ProgressChangedEventHandler(this.backgroundWorker_2_ProgressChanged);
			this.backgroundWorker_2.CancelAsync();
			this.backgroundWorker_2 = null;
		}
		if (this.backgroundWorker_3 != null)
		{
			this.backgroundWorker_3.DoWork -= new DoWorkEventHandler(this.backgroundWorker_3_DoWork);
			this.backgroundWorker_3.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(this.backgroundWorker_3_RunWorkerCompleted);
			this.backgroundWorker_3.ProgressChanged -= new ProgressChangedEventHandler(this.backgroundWorker_3_ProgressChanged);
			this.backgroundWorker_3.CancelAsync();
			this.backgroundWorker_3 = null;
		}
		this.method_36();
	}
	private void method_16(object object_0, string string_3)
	{
		this.ilog_0.Error(string_3);
	}
	private void method_17(object sender, NewFrameEventArgs e)
	{
		try
		{
			if (MainForm.SystemConfiguration_0.int_0 == 0 && this.color_0 == System.Drawing.Color.Red && this.bool_0)
			{
				UnmanagedImage currentUnmanagedVideoFrame = MainForm.SystemConfiguration_0.ViewCamera.GetCurrentUnmanagedVideoFrame();
				if (this.motionDetector_0 != null && currentUnmanagedVideoFrame != null)
				{
					float num = this.motionDetector_0.ProcessFrame(currentUnmanagedVideoFrame);
					float num2 = (float)MainForm.SystemConfiguration_0.ViewCamera.MotionAlarmLevel / 1000f;
					if (num > num2)
					{
						this.int_0 = 1000 / this.timer_2.Interval;
						if (MainForm.SystemConfiguration_0.camera_0 != null && MainForm.SystemConfiguration_0.camera_0.IsRunning && !this.backgroundWorker_1.IsBusy && this.backgroundWorker_1 != null)
						{
							this.backgroundWorker_1.RunWorkerAsync();
						}
					}
					currentUnmanagedVideoFrame.Dispose();
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void method_18(object sender, NewFrameEventArgs e)
	{
		try
		{
			if (MainForm.SystemConfiguration_0.int_1 == 0 && this.color_0 == System.Drawing.Color.Red && this.bool_0)
			{
				UnmanagedImage unmanagedImage = UnmanagedImage.FromManagedImage(e.Frame);
				if (this.motionDetector_1 != null && unmanagedImage != null)
				{
					float num = this.motionDetector_1.ProcessFrame(unmanagedImage);
					float num2 = (float)MainForm.SystemConfiguration_0.ViewCamera.MotionAlarmLevel / 1000f;
					if (num > num2)
					{
						this.int_1 = 1000 / this.timer_3.Interval;
						if (MainForm.SystemConfiguration_0.ZoomCamera != null && MainForm.SystemConfiguration_0.ZoomCamera.IsRunning && !this.backgroundWorker_2.IsBusy && this.backgroundWorker_2 != null)
						{
							this.backgroundWorker_2.RunWorkerAsync();
						}
					}
					unmanagedImage.Dispose();
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void timer_0_Tick(object sender, System.EventArgs e)
	{
		try
		{
			if (this.color_0 == System.Drawing.Color.Red && this.bool_0)
			{
				UnmanagedImage currentUnmanagedVideoFrame = MainForm.SystemConfiguration_0.ViewCamera.GetCurrentUnmanagedVideoFrame();
				if (this.motionDetector_0 != null && currentUnmanagedVideoFrame != null)
				{
					float num = this.motionDetector_0.ProcessFrame(currentUnmanagedVideoFrame);
					float num2 = (float)MainForm.SystemConfiguration_0.ViewCamera.MotionAlarmLevel / 1000f;
					if (num > num2)
					{
						this.int_0 = 1000 / this.timer_2.Interval;
						if (MainForm.SystemConfiguration_0.camera_0 != null && MainForm.SystemConfiguration_0.camera_0.IsRunning && !this.backgroundWorker_1.IsBusy && this.backgroundWorker_1 != null)
						{
							this.backgroundWorker_1.RunWorkerAsync();
						}
					}
				}
				if (currentUnmanagedVideoFrame != null)
				{
					currentUnmanagedVideoFrame.Dispose();
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void timer_1_Tick(object sender, System.EventArgs e)
	{
		try
		{
			if (this.color_0 == System.Drawing.Color.Red && this.bool_0)
			{
				UnmanagedImage currentUnmanagedVideoFrame = MainForm.SystemConfiguration_0.ViewCamera.GetCurrentUnmanagedVideoFrame();
				if (this.motionDetector_1 != null && currentUnmanagedVideoFrame != null)
				{
					float num = this.motionDetector_1.ProcessFrame(currentUnmanagedVideoFrame);
					float num2 = (float)MainForm.SystemConfiguration_0.ViewCamera.MotionAlarmLevel / 1000f;
					if (num > num2)
					{
						this.int_1 = 1000 / this.timer_3.Interval;
						if (MainForm.SystemConfiguration_0.ZoomCamera != null && MainForm.SystemConfiguration_0.ZoomCamera.IsRunning && !this.backgroundWorker_2.IsBusy && this.backgroundWorker_2 != null)
						{
							this.backgroundWorker_2.RunWorkerAsync();
						}
					}
				}
				currentUnmanagedVideoFrame.Dispose();
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void timer_2_Tick(object sender, System.EventArgs e)
	{
		if (this.int_0 > 0 && MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer != null)
		{
			MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer.MotionRectangleColor = (this.int_0 % 2 == 1) ? System.Drawing.Color.Green : System.Drawing.Color.Red;
			this.int_0--;
		}
	}
	private void timer_3_Tick(object sender, System.EventArgs e)
	{
		if (this.int_1 > 0 && MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer != null)
		{
			MainForm.SystemConfiguration_0.ViewCamera.videoSourcePlayer.MotionRectangleColor = (this.int_1 % 2 == 1) ? System.Drawing.Color.Green : System.Drawing.Color.Yellow;
			this.int_1--;
		}
	}
	private void method_19(object sender, NewFrameEventArgs e)
	{
		try
		{
			if (MainForm.SystemConfiguration_0.int_4 == 0)
			{
				if (System.DateTime.Now.TimeOfDay >= MainForm.SystemConfiguration_0.dateTime_0.TimeOfDay && System.DateTime.Now.TimeOfDay <= MainForm.SystemConfiguration_0.dateTime_1.TimeOfDay)
				{
					if (!this.chkRedLightSimulation.Checked && !this.backgroundWorker_3.IsBusy)
					{
						this.color_1 = this.color_0;
						this.backgroundWorker_3.RunWorkerAsync();
					}
				}
				else
				{
					this.color_0 = System.Drawing.Color.Green;
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void timer_5_Tick(object sender, System.EventArgs e)
	{
		if (System.DateTime.Now.TimeOfDay >= MainForm.SystemConfiguration_0.dateTime_0.TimeOfDay && System.DateTime.Now.TimeOfDay <= MainForm.SystemConfiguration_0.dateTime_1.TimeOfDay)
		{
			if (!this.chkRedLightSimulation.Checked && !this.backgroundWorker_3.IsBusy)
			{
				this.color_1 = this.color_0;
				this.backgroundWorker_3.RunWorkerAsync();
				return;
			}
		}
		else
		{
			this.color_0 = System.Drawing.Color.Green;
		}
	}
	private void method_20()
	{
		try
		{
			this.backgroundWorker_1 = new BackgroundWorker();
			this.backgroundWorker_1.WorkerSupportsCancellation = true;
			this.backgroundWorker_1.DoWork += new DoWorkEventHandler(this.backgroundWorker_1_DoWork);
			this.backgroundWorker_1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker_1_RunWorkerCompleted);
			this.backgroundWorker_1.ProgressChanged += new ProgressChangedEventHandler(this.backgroundWorker_1_ProgressChanged);
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_1_DoWork(object sender, DoWorkEventArgs e)
	{
		try
		{
			BackgroundWorker backgroundWorker = sender as BackgroundWorker;
			if (!backgroundWorker.CancellationPending)
			{
				this.method_22(MainForm.SystemConfiguration_0.camera_0);
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_1_ProgressChanged(object sender, ProgressChangedEventArgs e)
	{
	}
	private void backgroundWorker_1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
	{
	}
	private void method_21()
	{
		try
		{
			this.backgroundWorker_2 = new BackgroundWorker();
			this.backgroundWorker_2.WorkerSupportsCancellation = true;
			this.backgroundWorker_2.DoWork += new DoWorkEventHandler(this.backgroundWorker_2_DoWork);
			this.backgroundWorker_2.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker_2_RunWorkerCompleted);
			this.backgroundWorker_2.ProgressChanged += new ProgressChangedEventHandler(this.backgroundWorker_2_ProgressChanged);
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_2_DoWork(object sender, DoWorkEventArgs e)
	{
		try
		{
			BackgroundWorker backgroundWorker = sender as BackgroundWorker;
			if (!backgroundWorker.CancellationPending)
			{
				this.method_22(MainForm.SystemConfiguration_0.ZoomCamera);
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_2_ProgressChanged(object sender, ProgressChangedEventArgs e)
	{
	}
	private void backgroundWorker_2_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
	{
	}
	private void method_22(Camera camera_0)
	{
		try
		{
			System.DateTime now = System.DateTime.Now;
			if (this.string_1 != string.Empty)
			{
				for (int i = 0; i < MainForm.SystemConfiguration_0.int_10; i++)
				{
					System.Drawing.Bitmap currentVideoFrame = MainForm.SystemConfiguration_0.ViewCamera.GetCurrentVideoFrame();
					System.Drawing.Bitmap currentVideoFrame2 = camera_0.GetCurrentVideoFrame();
					System.Drawing.Bitmap currentVideoFrame3 = MainForm.SystemConfiguration_0.RedLightCamera.GetCurrentVideoFrame();
					System.Drawing.Color left = System.Drawing.Color.Green;
					if (currentVideoFrame3 != null)
					{
						System.Drawing.Bitmap bitmap = this.method_24(currentVideoFrame3, MainForm.SystemConfiguration_0.rectangle_0);
						if (bitmap != null)
						{
							System.Drawing.Color color = MainForm.SystemConfiguration_0.method_30(bitmap);
							left = MainForm.SystemConfiguration_0.method_35(color);
							bitmap.Dispose();
						}
					}
					if (left == System.Drawing.Color.Red || this.bool_1 || this.chkRedLightSimulation.Checked)
					{
						ExtendCollection4 gClass = new ExtendCollection4();
						gClass.dateTime_0 = now;
						gClass.bitmap_1 = currentVideoFrame3;
						gClass.string_2 = string.Concat(new object[]
						{
							now.ToString("yyyyMMdd_HHmmss"),
							".",
							now.Millisecond,
							".",
							now.Ticks,
							"_RL.",
							i,
							".jpg"
						});
						gClass.string_3 = this.string_1 + "\\" + gClass.string_2;
						string str = string.Concat(new object[]
						{
							now.ToString("yyyyMMdd_HHmmss"),
							".",
							now.Millisecond,
							".",
							now.Ticks,
							"_VH.",
							i,
							".jpg"
						});
						string string_ = this.string_1 + "\\" + str;
						if (currentVideoFrame2 != null)
						{
							using (System.Drawing.Bitmap bitmap2 = new System.Drawing.Bitmap(currentVideoFrame2))
							{
								if (MainForm.SystemConfiguration_0.method_1(bitmap2, string_))
								{
									gClass.int_1 = camera_0.ID;
									gClass.bitmap_0 = currentVideoFrame2;
									gClass.string_0 = str;
									gClass.string_1 = string_;
									gClass.bitmap_2 = currentVideoFrame;
									gClass.string_4 = string.Concat(new object[]
									{
										now.ToString("yyyyMMdd_HHmmss"),
										".",
										now.Millisecond,
										".",
										now.Ticks,
										"_PN.",
										i,
										".jpg"
									});
									gClass.string_5 = this.string_1 + "\\" + gClass.string_4;
									gClass.string_7 = string.Concat(new object[]
									{
										now.ToString("yyyyMMdd_HHmmss"),
										".",
										now.Millisecond,
										".",
										now.Ticks,
										".",
										i,
										".xml"
									});
									System.IO.DirectoryInfo directoryInfo = new System.IO.DirectoryInfo(this.string_1);
									gClass.string_8 = directoryInfo.Parent.FullName + "\\" + gClass.string_7;
									this.queue_0.Enqueue(gClass);
								}
								bitmap2.Dispose();
							}
						}
						if (!this.backgroundWorker_0.IsBusy)
						{
							this.backgroundWorker_0.RunWorkerAsync();
						}
					}
					if (MainForm.SystemConfiguration_0.int_9 > 0)
					{
						System.Threading.Thread.Sleep(MainForm.SystemConfiguration_0.int_9);
					}
				}
				if (!this.backgroundWorker_0.IsBusy)
				{
					this.backgroundWorker_0.RunWorkerAsync();
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
		finally
		{
			System.GC.Collect();
		}
	}
	private void method_23()
	{
		try
		{
			this.backgroundWorker_3 = new BackgroundWorker();
			this.backgroundWorker_3.WorkerSupportsCancellation = true;
			this.backgroundWorker_3.WorkerReportsProgress = true;
			this.backgroundWorker_3.DoWork += new DoWorkEventHandler(this.backgroundWorker_3_DoWork);
			this.backgroundWorker_3.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker_3_RunWorkerCompleted);
			this.backgroundWorker_3.ProgressChanged += new ProgressChangedEventHandler(this.backgroundWorker_3_ProgressChanged);
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_3_DoWork(object sender, DoWorkEventArgs e)
	{
		try
		{
			BackgroundWorker backgroundWorker = sender as BackgroundWorker;
			if (!backgroundWorker.CancellationPending)
			{
				System.Drawing.Bitmap currentVideoFrame = MainForm.SystemConfiguration_0.RedLightCamera.GetCurrentVideoFrame();
				if (currentVideoFrame != null)
				{
					System.Drawing.Bitmap bitmap = this.method_24(currentVideoFrame, MainForm.SystemConfiguration_0.rectangle_0);
					if (bitmap != null)
					{
						System.Drawing.Color color = MainForm.SystemConfiguration_0.method_30(bitmap);
						MainForm.SystemConfiguration_0.method_14(this.lblRGBInfo, "Text", "R=" + color.R);
						this.color_0 = MainForm.SystemConfiguration_0.method_35(color);
						if (this.color_0 != System.Drawing.Color.Red)
						{
							this.int_3++;
						}
						backgroundWorker.ReportProgress(0, this.color_0);
						bitmap.Dispose();
					}
					currentVideoFrame.Dispose();
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
		finally
		{
			System.GC.Collect();
		}
	}
	private void backgroundWorker_3_ProgressChanged(object sender, ProgressChangedEventArgs e)
	{
		try
		{
			this.color_0 = (System.Drawing.Color)e.UserState;
			if (MainForm.SystemConfiguration_0.int_8 > 0 && this.color_1 != System.Drawing.Color.Red && this.color_0 == System.Drawing.Color.Red && this.int_3 > MainForm.SystemConfiguration_0.int_7)
			{
				this.int_3 = 0;
				this.bool_0 = false;
				this.int_2 = 0;
				this.timer_4.Start();
			}
			if (this.color_0 == System.Drawing.Color.Red)
			{
                MainForm.SystemConfiguration_0.method_14(this.picTrafficLight, "Image", global::Properties.Resources.Red);
			}
			else
			{
                MainForm.SystemConfiguration_0.method_14(this.picTrafficLight, "Image", global::Properties.Resources.Green);
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_3_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
	{
	}
	private void timer_4_Tick(object sender, System.EventArgs e)
	{
		this.int_2++;
		if (this.int_2 >= MainForm.SystemConfiguration_0.int_8 / this.timer_4.Interval)
		{
			this.bool_0 = true;
			this.timer_4.Stop();
		}
	}
	private System.Drawing.Bitmap method_24(System.Drawing.Image image_0, System.Drawing.Rectangle rectangle_0)
	{
		System.Drawing.Bitmap result = null;
		try
		{
			using (System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(image_0))
			{
				result = bitmap.Clone(rectangle_0, bitmap.PixelFormat);
				bitmap.Dispose();
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
		return result;
	}
	private void method_25()
	{
		try
		{
			this.backgroundWorker_0 = new BackgroundWorker();
			this.backgroundWorker_0.WorkerSupportsCancellation = true;
			this.backgroundWorker_0.WorkerReportsProgress = true;
			this.backgroundWorker_0.DoWork += new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
			this.backgroundWorker_0.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker_0_RunWorkerCompleted);
			this.backgroundWorker_0.ProgressChanged += new ProgressChangedEventHandler(this.backgroundWorker_0_ProgressChanged);
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_0_DoWork(object sender, DoWorkEventArgs e)
	{
		try
		{
			BackgroundWorker backgroundWorker = sender as BackgroundWorker;
			if (!backgroundWorker.CancellationPending)
			{
				while (this.queue_0.Count > 0)
				{
					ExtendCollection4 gClass = (ExtendCollection4)this.queue_0.Dequeue();
					string text = string.Empty;
					int num = 0;
					System.Drawing.Bitmap bitmap_ = null;
					MainForm.ilprprocessing_0.Analyze(gClass.string_1, gClass.bitmap_0, ref text, ref num, ref bitmap_);
					gClass.int_2 = num;
					gClass.bitmap_3 = bitmap_;
					if (text.Length >= 10 && char.IsLetter(text[4]))
					{
						if (text[4] == 'H')
						{
							text = text.Remove(4, 1).Insert(4, "8");
						}
						else
						{
							if (text[4] == 'Z')
							{
								text = text.Remove(4, 1).Insert(4, "2");
							}
							else
							{
								if (text[4] == 'S')
								{
									text = text.Remove(4, 1).Insert(4, "5");
								}
							}
						}
					}
					gClass.string_6 = text;
					backgroundWorker.ReportProgress(0, gClass);
					if (MainForm.SystemConfiguration_0.int_12 > 0)
					{
						System.Threading.Thread.Sleep(MainForm.SystemConfiguration_0.int_12);
					}
				}
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_0_ProgressChanged(object sender, ProgressChangedEventArgs e)
	{
		try
		{
			ExtendCollection4 gClass = (ExtendCollection4)e.UserState;
			if (MainForm.SystemConfiguration_0.bool_2 && (gClass.string_6 == string.Empty || gClass.string_6 == this.string_0))
			{
				MainForm.queue_1.Enqueue(gClass.string_1);
			}
			else
			{
				this.string_0 = gClass.string_6;
				if (gClass.bitmap_2 != null)
				{
					using (System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(gClass.bitmap_2))
					{
						if (MainForm.SystemConfiguration_0.method_1(bitmap, gClass.string_5) && gClass.bitmap_1 != null)
						{
							using (System.Drawing.Bitmap bitmap2 = new System.Drawing.Bitmap(gClass.bitmap_1))
							{
								if (MainForm.SystemConfiguration_0.method_1(bitmap2, gClass.string_3) && gClass.bitmap_3 != null)
								{
									using (System.Drawing.Bitmap bitmap3 = new System.Drawing.Bitmap(gClass.bitmap_3))
									{
										MainForm.SystemConfiguration_0.method_1(bitmap3, gClass.string_1 + ".jpg");
									}
								}
							}
						}
					}
				}
				int num = 0;
				MainForm.SystemConfiguration_0.method_0(this.string_0, ref num);
				string text = string.Concat(new object[]
				{
					"insert into tblEvent (EventDateTime, PlateNumber, VehicleImagePath, PanoramaImagePath, RedLightImagePath, RecognizeTime, CameraID, TransactionPath, VehicleType) values (#",
					gClass.dateTime_0,
					"#, '",
					gClass.string_6,
					"', '",
					gClass.string_1,
					"', '",
					gClass.string_5,
					"', '",
					gClass.string_3,
					"', ",
					gClass.int_2,
					", ",
					gClass.int_1,
					", '",
					gClass.string_8,
					"', ",
					num,
					")"
				});
				MainForm.SystemConfiguration_0.iconnection_0.ExecuteCommand(text);
				MainForm.SystemConfiguration_0.method_14(this.lblPlateNumber, "Text", gClass.string_6);
				MainForm.SystemConfiguration_0.method_14(this.picPanoramaImage, "Image", gClass.bitmap_2);
				MainForm.SystemConfiguration_0.method_14(this.picVehicleImage, "Image", gClass.bitmap_0);
				MainForm.SystemConfiguration_0.method_14(this.picRedLightImage, "Image", gClass.bitmap_1);
				MainForm.SystemConfiguration_0.method_14(this.picPlateImage, "Image", gClass.bitmap_3);
				this.method_26(gClass);
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_0_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
	{
		if (MainForm.SystemConfiguration_0.int_12 > 0)
		{
			System.Threading.Thread.Sleep(MainForm.SystemConfiguration_0.int_12);
		}
	}
	private void method_26(ExtendCollection4 ExtendCollection4_0)
	{
		try
		{
			if (this.dataGridView1.InvokeRequired)
			{
				MainForm.Delegate1 method = new MainForm.Delegate1(this.method_26);
				base.Invoke(method, new object[]
				{
					ExtendCollection4_0
				});
			}
			else
			{
				if (this.int_4 >= MainForm.SystemConfiguration_0.int_15)
				{
					this.dataGridView1.Rows.Clear();
					this.int_4 = 0;
				}
				this.int_4++;
				this.dataGridView1.Rows.Add(new object[]
				{
					this.int_4.ToString(),
					ExtendCollection4_0.dateTime_0.ToString("dd/MM/yyyy"),
					ExtendCollection4_0.dateTime_0.ToString("HH:mm:ss"),
					ExtendCollection4_0.string_6,
					ExtendCollection4_0.int_2.ToString(),
					ExtendCollection4_0.string_1,
					ExtendCollection4_0.string_5,
					ExtendCollection4_0.string_3,
					ExtendCollection4_0.string_8
				});
				this.dataGridView1.CurrentCell = this.dataGridView1[0, this.dataGridView1.Rows.Count - 1];
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void miVehicleCamera1Config_Click(object sender, System.EventArgs e)
	{
		this.method_4();
		CameraForm cameraForm = new CameraForm();
		cameraForm.Camera = MainForm.SystemConfiguration_0.camera_0;
		cameraForm.CheckCameraFunction = new CheckCameraHandler(this.method_27);
		if (cameraForm.ShowDialog() == DialogResult.OK)
		{
			MainForm.SystemConfiguration_0.method_6();
		}
		MainForm.SystemConfiguration_0.method_5();
		this.method_0();
		this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change setting of vehicle camera 1.");
	}
	private void miVehicleCamera1MotionConfig_Click(object sender, System.EventArgs e)
	{
		System.Drawing.Bitmap currentVideoFrame = MainForm.SystemConfiguration_0.camera_0.GetCurrentVideoFrame();
		if (currentVideoFrame != null)
		{
			MotionRegionsForm motionRegionsForm = new MotionRegionsForm();
			motionRegionsForm.VideoFrame = currentVideoFrame;
			motionRegionsForm.MotionRectangles = MainForm.SystemConfiguration_0.camera_0.GetMotionRectangles();
			if (motionRegionsForm.ShowDialog(this) == DialogResult.OK)
			{
				System.Drawing.Rectangle[] array = motionRegionsForm.MotionRectangles;
				if (array.Length == 0)
				{
					array = null;
				}
				MainForm.SystemConfiguration_0.camera_0.MotionRegions = MainForm.SystemConfiguration_0.camera_0.GetMotionRegions(array);
				MainForm.SystemConfiguration_0.method_6();
				this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change motion setting of vehicle camera 1.");
			}
		}
	}
	private void miVehicleCamera2Config_Click(object sender, System.EventArgs e)
	{
		MainForm.SystemConfiguration_0.ZoomCamera.Stop();
		CameraForm cameraForm = new CameraForm();
		cameraForm.Camera = MainForm.SystemConfiguration_0.ZoomCamera;
		cameraForm.CheckCameraFunction = new CheckCameraHandler(this.method_27);
		if (cameraForm.ShowDialog() == DialogResult.OK)
		{
			MainForm.SystemConfiguration_0.method_6();
		}
		MainForm.SystemConfiguration_0.method_5();
		MainForm.SystemConfiguration_0.ZoomCamera.Start();
		this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change setting of vehicle camera 2.");
	}
	private void miVehicleCamera2MotionConfig_Click(object sender, System.EventArgs e)
	{
		System.Drawing.Bitmap currentVideoFrame = MainForm.SystemConfiguration_0.ZoomCamera.GetCurrentVideoFrame();
		if (currentVideoFrame != null)
		{
			MotionRegionsForm motionRegionsForm = new MotionRegionsForm();
			motionRegionsForm.VideoFrame = currentVideoFrame;
			motionRegionsForm.MotionRectangles = MainForm.SystemConfiguration_0.ZoomCamera.GetMotionRectangles();
			if (motionRegionsForm.ShowDialog(this) == DialogResult.OK)
			{
				System.Drawing.Rectangle[] array = motionRegionsForm.MotionRectangles;
				if (array.Length == 0)
				{
					array = null;
				}
				MainForm.SystemConfiguration_0.ZoomCamera.MotionRegions = MainForm.SystemConfiguration_0.ZoomCamera.GetMotionRegions(array);
				MainForm.SystemConfiguration_0.method_6();
				this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change motion setting of vehicle camera 2.");
			}
		}
	}
	private void miPanoramaCameraConfig_Click(object sender, System.EventArgs e)
	{
		this.method_6();
		CameraForm cameraForm = new CameraForm();
		cameraForm.Camera = MainForm.SystemConfiguration_0.ViewCamera;
		cameraForm.CheckCameraFunction = new CheckCameraHandler(this.method_27);
		if (cameraForm.ShowDialog() == DialogResult.OK)
		{
			MainForm.SystemConfiguration_0.method_6();
		}
		MainForm.SystemConfiguration_0.method_5();
		this.method_2();
		this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change setting of panorama camera.");
	}
	private void miPanoramaCameraMotionConfig_Click(object sender, System.EventArgs e)
	{
		System.Drawing.Bitmap currentVideoFrame = MainForm.SystemConfiguration_0.ViewCamera.GetCurrentVideoFrame();
		if (currentVideoFrame != null)
		{
			MotionRegionsForm motionRegionsForm = new MotionRegionsForm();
			motionRegionsForm.VideoFrame = currentVideoFrame;
			motionRegionsForm.MotionRectangles = MainForm.SystemConfiguration_0.ViewCamera.GetMotionRectangles();
			if (motionRegionsForm.ShowDialog(this) == DialogResult.OK)
			{
				System.Drawing.Rectangle[] array = motionRegionsForm.MotionRectangles;
				if (array.Length == 0)
				{
					array = null;
				}
				MainForm.SystemConfiguration_0.ViewCamera.MotionRegions = MainForm.SystemConfiguration_0.ViewCamera.GetMotionRegions(array);
				MainForm.SystemConfiguration_0.method_6();
				this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change motion setting of panorama.");
			}
		}
	}
	private void miRedLightCameraConfig_Click(object sender, System.EventArgs e)
	{
		this.method_7();
		CameraForm cameraForm = new CameraForm();
		cameraForm.Camera = MainForm.SystemConfiguration_0.RedLightCamera;
		cameraForm.CheckCameraFunction = new CheckCameraHandler(this.method_27);
		if (cameraForm.ShowDialog() == DialogResult.OK)
		{
			MainForm.SystemConfiguration_0.method_6();
		}
		MainForm.SystemConfiguration_0.method_5();
		this.InitCamera2();
		this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change setting of red light camera.");
	}
	private void miRedLightCameraMotionConfig_Click(object sender, System.EventArgs e)
	{
		System.Drawing.Bitmap currentVideoFrame = MainForm.SystemConfiguration_0.RedLightCamera.GetCurrentVideoFrame();
		if (currentVideoFrame != null)
		{
			MotionRegionsForm motionRegionsForm = new MotionRegionsForm();
			motionRegionsForm.VideoFrame = currentVideoFrame;
			motionRegionsForm.MotionRectangles = MainForm.SystemConfiguration_0.RedLightCamera.GetMotionRectangles();
			if (motionRegionsForm.ShowDialog(this) == DialogResult.OK)
			{
				System.Drawing.Rectangle[] array = motionRegionsForm.MotionRectangles;
				if (array.Length == 0)
				{
					array = null;
				}
				MainForm.SystemConfiguration_0.RedLightCamera.MotionRegions = MainForm.SystemConfiguration_0.RedLightCamera.GetMotionRegions(array);
				MainForm.SystemConfiguration_0.method_6();
				this.ilog_0.Info("User: " + RegisterationInfo.gclass2_0.method_2() + " change motion setting of red light camera.");
			}
		}
	}
	private bool method_27(Camera camera_0)
	{
		return true;
	}
	private void method_28(object sender, System.EventArgs e)
	{
		int arg_0B_0 = ((PagedWizard)sender).SelectedPageIndex;
	}
	private void method_29(object sender, System.EventArgs e)
	{
		frmViewCamera frmViewCamera = new frmViewCamera();
		frmViewCamera.CurrentCamera = MainForm.SystemConfiguration_0.camera_0;
		frmViewCamera.ShowDialog();
	}
	private void ShowZoomCamera(object sender, System.EventArgs e)
	{
		frmViewCamera frmViewCamera = new frmViewCamera();
		frmViewCamera.CurrentCamera = MainForm.SystemConfiguration_0.ZoomCamera;
		frmViewCamera.ShowDialog();
	}
	private void ShowRedLightCamera(object sender, System.EventArgs e)
	{
		frmViewCamera frmViewCamera = new frmViewCamera();
		frmViewCamera.CurrentCamera = MainForm.SystemConfiguration_0.RedLightCamera;
		frmViewCamera.ShowDialog();
	}
	private void ShowViewCamera(object sender, System.EventArgs e)
	{
		frmViewCamera frmViewCamera = new frmViewCamera();
		frmViewCamera.CurrentCamera = MainForm.SystemConfiguration_0.ViewCamera;
		frmViewCamera.ShowDialog();
	}
	private void picVehicleImage_DoubleClick(object sender, System.EventArgs e)
	{
		if (this.picVehicleImage.Image != null)
		{
			frmViewImage frmViewImage = new frmViewImage();
			frmViewImage.CurrentImage = this.picVehicleImage.Image;
			frmViewImage.ShowDialog();
		}
	}
	private void picPanoramaImage_DoubleClick(object sender, System.EventArgs e)
	{
		if (this.picPanoramaImage.Image != null)
		{
			frmViewImage frmViewImage = new frmViewImage();
			frmViewImage.CurrentImage = this.picPanoramaImage.Image;
			frmViewImage.ShowDialog();
		}
	}
	private void picRedLightImage_DoubleClick(object sender, System.EventArgs e)
	{
		if (this.picRedLightImage.Image != null)
		{
			frmViewImage frmViewImage = new frmViewImage();
			frmViewImage.CurrentImage = this.picRedLightImage.Image;
			frmViewImage.ShowDialog();
		}
	}
	private void miAbout_Click(object sender, System.EventArgs e)
	{
		frmAbout frmAbout = new frmAbout();
		frmAbout.ShowDialog();
	}
	private void miOption_Click(object sender, System.EventArgs e)
	{
		this.timer_0.Tick -= new System.EventHandler(this.timer_0_Tick);
		this.timer_0.Stop();
		this.timer_1.Tick -= new System.EventHandler(this.timer_1_Tick);
		this.timer_1.Stop();
		this.timer_5.Stop();
		frmOption frmOption = new frmOption();
		frmOption.ShowDialog();
		if (MainForm.SystemConfiguration_0.int_0 > 0)
		{
			this.timer_0.Interval = MainForm.SystemConfiguration_0.int_0;
			this.timer_0.Tick += new System.EventHandler(this.timer_0_Tick);
			this.timer_0.Start();
		}
		if (MainForm.SystemConfiguration_0.int_16 > 1)
		{
			this.timer_1.Interval = MainForm.SystemConfiguration_0.int_1;
			this.timer_1.Tick += new System.EventHandler(this.timer_1_Tick);
			this.timer_1.Start();
		}
		MainForm.SystemConfiguration_0.RedLightCamera.MotionRegions = MainForm.SystemConfiguration_0.RedLightCamera.GetMotionRegions(new System.Drawing.Rectangle[]
		{
			MainForm.SystemConfiguration_0.rectangle_0
		});
		this.timer_5.Interval = MainForm.SystemConfiguration_0.int_4;
		this.timer_5.Start();
		System.Drawing.Color backColor = System.Drawing.Color.FromName(MainForm.SystemConfiguration_0.string_15);
		this.panelCamera.BackColor = backColor;
		this.panelResult.BackColor = backColor;
		this.string_2 = MainForm.SystemConfiguration_0.m_Title;
		if (MainForm.SystemConfiguration_0.string_11 != string.Empty)
		{
			this.string_2 = this.string_2 + " - " + MainForm.SystemConfiguration_0.string_11;
		}
		if (MainForm.SystemConfiguration_0.string_12 != string.Empty)
		{
			this.string_2 = this.string_2 + " - " + MainForm.SystemConfiguration_0.string_12;
		}
		else
		{
			this.string_2 += " - NGUYỄN THANH TOÀN SOFTWARE";
		}
		this.Text = this.string_2;
		if (RegisterationInfo.m_RunTimeMode)
		{
			this.Text += " DEMO";
		}
	}
	private void miViolationReport_Click(object sender, System.EventArgs e)
	{
		frmViolationReport frmViolationReport = new frmViolationReport();
		frmViolationReport.ShowDialog();
	}
	private void miHelp_Click(object sender, System.EventArgs e)
	{
	}
	private void miRegistration_Click(object sender, System.EventArgs e)
	{
		frmRegistration frmRegistration = new frmRegistration();
		frmRegistration.UserCode = RegisterationInfo.m_UserCode;
		frmRegistration.ActivationKey = RegisterationInfo.m_ActivationKey;
		frmRegistration.HideDemoButton = true;
		if (frmRegistration.ShowDialog() == DialogResult.OK)
		{
			Author.WriteSecurityFile(System.Environment.GetFolderPath(System.Environment.SpecialFolder.System) + "\\RLAT.ini", frmRegistration.ActivationKey, true);
			RegisterationInfo.m_RunTimeMode = false;
			RegisterationInfo.m_ActivationKey = frmRegistration.ActivationKey;
			this.Text = this.string_2;
		}
	}
	private void miExit_Click(object sender, System.EventArgs e)
	{
		base.Close();
	}
	private void miUserConfig_Click(object sender, System.EventArgs e)
	{
		frmUsers frmUsers = new frmUsers();
		frmUsers.ShowDialog();
	}
	private void chkRedLightSimulation_CheckedChanged(object sender, System.EventArgs e)
	{
		if (this.chkRedLightSimulation.Checked)
		{
			this.color_0 = System.Drawing.Color.Red;
            this.picTrafficLight.Image = global::Properties.Resources.Red;
			return;
		}
		this.color_0 = System.Drawing.Color.Green;
	}
	private void miLogin_Click(object sender, System.EventArgs e)
	{
		frmLogin frmLogin = new frmLogin();
		if (frmLogin.ShowDialog() == DialogResult.OK)
		{
            RegisterationInfo.gclass2_0 = MainForm.SystemConfiguration_0.ExtendCollection_0.Search3(frmLogin.method_0(), frmLogin.method_1());
			if (RegisterationInfo.gclass2_0.method_8() == 0)
			{
				this.miUserConfig.Enabled = true;
				this.miLogin.Enabled = false;
				this.miLogout.Enabled = true;
				this.miChangePassword.Enabled = true;
				this.miCameraConfig.Enabled = true;
				this.miMotionConfig.Enabled = true;
				this.miOption.Enabled = true;
				this.msReport.Enabled = true;
				this.miViolationReport.Enabled = true;
				this.miVehicle.Enabled = true;
				this.miListDeleted.Enabled = true;
				this.msData.Enabled = true;
				this.ilog_0.Info("Login: " + RegisterationInfo.gclass2_0.method_2() + "; Access Level: Administrator");
				return;
			}
			if (RegisterationInfo.gclass2_0.method_8() == 1)
			{
				this.miUserConfig.Enabled = false;
				this.miLogin.Enabled = false;
				this.miLogout.Enabled = true;
				this.miChangePassword.Enabled = true;
				this.miCameraConfig.Enabled = false;
				this.miMotionConfig.Enabled = false;
				this.miOption.Enabled = false;
				this.msReport.Enabled = true;
				this.miViolationReport.Enabled = true;
				this.miVehicle.Enabled = true;
				this.miListDeleted.Enabled = false;
				this.msData.Enabled = false;
				this.ilog_0.Info("Login: " + RegisterationInfo.gclass2_0.method_2() + "; Access Level: Manager");
			}
		}
	}
	private void miLogout_Click(object sender, System.EventArgs e)
	{
		this.ilog_0.Info("Logout: " + RegisterationInfo.gclass2_0.method_2());
		RegisterationInfo.gclass2_0 = null;
		this.miUserConfig.Enabled = false;
		this.miLogin.Enabled = true;
		this.miLogout.Enabled = false;
		this.miChangePassword.Enabled = false;
		this.miCameraConfig.Enabled = false;
		this.miMotionConfig.Enabled = false;
		this.miOption.Enabled = false;
		this.msReport.Enabled = false;
		this.miViolationReport.Enabled = false;
		this.miVehicle.Enabled = false;
		this.miListDeleted.Enabled = false;
		this.msData.Enabled = false;
	}
	private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
	{
		if (e.RowIndex > -1)
		{
			this.dataGridView1.CurrentCell = this.dataGridView1[0, e.RowIndex];
		}
	}
	private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
	{
		if (e.RowIndex >= 0)
		{
			this.method_33();
		}
	}
	private void method_33()
	{
		if (this.dataGridView1.RowCount > 0)
		{
			try
			{
				string text = this.dataGridView1.CurrentRow.Cells["VehicleImagePathColumn"].Value.ToString();
				if (System.IO.File.Exists(text))
				{
					this.picVehicleImage.Image = System.Drawing.Image.FromFile(text);
				}
				else
				{
					this.picVehicleImage.Image = null;
				}
				string text2 = this.dataGridView1.CurrentRow.Cells["PanoramaImagePathColumn"].Value.ToString();
				if (System.IO.File.Exists(text2))
				{
					this.picPanoramaImage.Image = System.Drawing.Image.FromFile(text2);
				}
				else
				{
					this.picPanoramaImage.Image = null;
				}
				string text3 = this.dataGridView1.CurrentRow.Cells["RedLightImagePathColumn"].Value.ToString();
				if (System.IO.File.Exists(text3))
				{
					this.picRedLightImage.Image = System.Drawing.Image.FromFile(text3);
				}
				else
				{
					this.picRedLightImage.Image = null;
				}
				if (System.IO.File.Exists(text + ".jpg"))
				{
					this.picPlateImage.Image = System.Drawing.Image.FromFile(text + ".jpg");
				}
				else
				{
					this.picPlateImage.Image = null;
				}
				this.lblPlateNumber.Text = this.dataGridView1.CurrentRow.Cells["PlateNumberColumn"].Value.ToString();
			}
			catch (System.Exception ex)
			{
				this.ilog_0.Error(ex);
			}
		}
	}
	private void miVehicle_Click(object sender, System.EventArgs e)
	{
		frmVehicles frmVehicles = new frmVehicles();
		frmVehicles.ShowDialog();
	}
	private void miListDeleted_Click(object sender, System.EventArgs e)
	{
		frmListDeleted frmListDeleted = new frmListDeleted();
		frmListDeleted.ShowDialog();
	}
	private void method_34(bool bool_2)
	{
		if (bool_2)
		{
			this.menuStrip1.Visible = false;
			base.FormBorderStyle = FormBorderStyle.None;
			base.WindowState = FormWindowState.Maximized;
            SilverSea.Video.Tools.Win32.SetWinFullScreen(base.Handle);
			return;
		}
		this.menuStrip1.Visible = true;
		base.FormBorderStyle = FormBorderStyle.FixedDialog;
		base.WindowState = FormWindowState.Maximized;
        SilverSea.Video.Tools.Win32.SetWinFullScreen(base.Handle);
	}
	protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
	{
		if (msg.Msg == 256 || msg.Msg == 260)
		{
			if (keyData != Keys.Escape)
			{
				if (keyData != Keys.Delete)
				{
					switch (keyData)
					{
					case Keys.F6:
						if (MainForm.SystemConfiguration_0.camera_0.CameraType == CameraType.PanasonicPro)
						{
							Process.Start("http://" + MainForm.SystemConfiguration_0.camera_0.VideoSource);
						}
						break;
					case Keys.F7:
						if ( MainForm.SystemConfiguration_0.ZoomCamera.CameraType == CameraType.PanasonicPro)
						{
							Process.Start("http://" + MainForm.SystemConfiguration_0.ZoomCamera.VideoSource);
						}
						break;
					case Keys.F8:
						if (MainForm.SystemConfiguration_0.ViewCamera.CameraType == CameraType.PanasonicPro)
						{
							Process.Start("http://" + MainForm.SystemConfiguration_0.ViewCamera.VideoSource);
						}
						break;
					case Keys.F9:
						if ( MainForm.SystemConfiguration_0.RedLightCamera.CameraType == CameraType.PanasonicPro)
						{
							Process.Start("http://" + MainForm.SystemConfiguration_0.RedLightCamera.VideoSource);
						}
						break;
					case Keys.F10:
						MainForm.SystemConfiguration_0.bool_4 = !MainForm.SystemConfiguration_0.bool_4;
						this.method_34(MainForm.SystemConfiguration_0.bool_4);
						break;
					case Keys.F11:
						if (MainForm.SystemConfiguration_0.camera_0 != null && MainForm.SystemConfiguration_0.camera_0.IsRunning)
						{
							this.bool_1 = true;
							this.ilog_0.Info("TESTING RECOGNIZE ON VEHICLE CAMERA 1");
							if (!this.backgroundWorker_1.IsBusy)
							{
								this.backgroundWorker_1.RunWorkerAsync();
							}
						}
						break;
					case Keys.F12:
						if (MainForm.SystemConfiguration_0.ZoomCamera != null && MainForm.SystemConfiguration_0.ZoomCamera.IsRunning)
						{
							this.bool_1 = true;
							this.ilog_0.Info("TESTING RECOGNIZE ON VEHICLE CAMERA 2");
							if (!this.backgroundWorker_2.IsBusy)
							{
								this.backgroundWorker_2.RunWorkerAsync();
							}
						}
						break;
					}
				}
				else
				{
					if (MessageBox.Show("Bạn có thực sự muốn xóa bản ghi này?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
					{
						string text = this.dataGridView1.CurrentRow.Cells["VehicleImagePathColumn"].Value.ToString();
						string text2 = string.Concat(new object[]
						{
							"update tblEvent set CheckDelete = ",
							true,
							" where VehicleImagePath = '",
							text,
							"'"
						});
						if (MainForm.SystemConfiguration_0.iconnection_0.ExecuteCommand(text2))
						{
							this.dataGridView1.Rows.RemoveAt(this.dataGridView1.CurrentRow.Index);
							if (this.dataGridView1.RowCount > 0)
							{
								this.dataGridView1.Rows[this.dataGridView1.RowCount - 1].Selected = true;
								this.dataGridView1.CurrentCell = this.dataGridView1[0, this.dataGridView1.RowCount - 1];
								this.method_33();
							}
						}
					}
				}
			}
			else
			{
				MainForm.SystemConfiguration_0.bool_4 = false;
				this.method_34(MainForm.SystemConfiguration_0.bool_4);
			}
		}
		return base.ProcessCmdKey(ref msg, keyData);
	}
	private void timer_7_Tick(object sender, System.EventArgs e)
	{
		this.tsDateTime.Text = System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
		this.tsQueue.Text = "Queue: " + this.queue_0.Count;
		this.tsCamera1.Text = "CAM1: " + MainForm.SystemConfiguration_0.camera_0.FPS.ToString("F2") + " fps";
		this.tsCamera2.Text = "CAM2: " + MainForm.SystemConfiguration_0.ZoomCamera.FPS.ToString("F2") + " fps";
		this.tsCamera3.Text = "CAM3: " + MainForm.SystemConfiguration_0.ViewCamera.FPS.ToString("F2") + " fps";
		this.tsCamera4.Text = "CAM4: " + MainForm.SystemConfiguration_0.RedLightCamera.FPS.ToString("F2") + " fps";
		if (MainForm.SystemConfiguration_0.int_21 > 0)
		{
			int num = (int)DateTimeUntils.DateDiff(SilverSea.Untilities.DateInterval.Minute, MainForm.SystemConfiguration_0.camera_0.LastTimeReceivedFrame, System.DateTime.Now);
			if (num >= MainForm.SystemConfiguration_0.int_21)
			{
				MainForm.SystemConfiguration_0.camera_0.SignalToStop();
				MainForm.SystemConfiguration_0.camera_0.Stop();
				System.Threading.Thread.Sleep(100);
				MainForm.SystemConfiguration_0.camera_0.Start();
				this.ilog_0.Info("reconnect to vehicle camera 1");
			}
			if (MainForm.SystemConfiguration_0.int_16 > 1)
			{
				num = (int)DateTimeUntils.DateDiff(SilverSea.Untilities.DateInterval.Minute, MainForm.SystemConfiguration_0.ZoomCamera.LastTimeReceivedFrame, System.DateTime.Now);
				if (num >= MainForm.SystemConfiguration_0.int_21)
				{
					MainForm.SystemConfiguration_0.ZoomCamera.SignalToStop();
					MainForm.SystemConfiguration_0.ZoomCamera.Stop();
					System.Threading.Thread.Sleep(100);
					MainForm.SystemConfiguration_0.ZoomCamera.Start();
					this.ilog_0.Info("reconnect to vehicle camera 2");
				}
			}
			num = (int)DateTimeUntils.DateDiff(SilverSea.Untilities.DateInterval.Minute, MainForm.SystemConfiguration_0.ViewCamera.LastTimeReceivedFrame, System.DateTime.Now);
			if (num >= MainForm.SystemConfiguration_0.int_21)
			{
				MainForm.SystemConfiguration_0.ViewCamera.SignalToStop();
				MainForm.SystemConfiguration_0.ViewCamera.Stop();
				System.Threading.Thread.Sleep(100);
				MainForm.SystemConfiguration_0.ViewCamera.Start();
				this.ilog_0.Info("reconnect to panorama camera");
			}
			num = (int)DateTimeUntils.DateDiff(SilverSea.Untilities.DateInterval.Minute, MainForm.SystemConfiguration_0.RedLightCamera.LastTimeReceivedFrame, System.DateTime.Now);
			if (num >= MainForm.SystemConfiguration_0.int_21)
			{
				MainForm.SystemConfiguration_0.RedLightCamera.SignalToStop();
				MainForm.SystemConfiguration_0.RedLightCamera.Stop();
				System.Threading.Thread.Sleep(100);
				MainForm.SystemConfiguration_0.RedLightCamera.Start();
				this.ilog_0.Info("reconnect to red light camera");
			}
		}
		if (MainForm.SystemConfiguration_0.bool_3)
		{
			try
			{
				this.cpuCounterPanel.Text = "CPU: " + System.Math.Ceiling((double)this.performanceCounter_0.NextValue()) + "%";
				this.ramCounterPanel.Text = "RAM: " + System.Math.Ceiling((double)this.performanceCounter_1.NextValue()) + "MB";
			}
			catch (System.Exception ex)
			{
				this.ilog_0.Error(ex);
			}
		}
	}
	private void timer_6_Tick(object sender, System.EventArgs e)
	{
		if (!this.backgroundWorker_4.IsBusy)
		{
			this.backgroundWorker_4.RunWorkerAsync();
		}
	}
	private void method_35()
	{
		try
		{
			this.backgroundWorker_4 = new BackgroundWorker();
			this.backgroundWorker_4.WorkerSupportsCancellation = true;
			this.backgroundWorker_4.WorkerReportsProgress = true;
			this.backgroundWorker_4.DoWork += new DoWorkEventHandler(this.backgroundWorker_4_DoWork);
			this.backgroundWorker_4.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker_4_RunWorkerCompleted);
			this.backgroundWorker_4.ProgressChanged += new ProgressChangedEventHandler(this.backgroundWorker_4_ProgressChanged);
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_4_DoWork(object sender, DoWorkEventArgs e)
	{
		try
		{
			BackgroundWorker backgroundWorker = sender as BackgroundWorker;
			if (!backgroundWorker.CancellationPending && MainForm.queue_1.Count > 0)
			{
				string string_ = (string)MainForm.queue_1.Dequeue();
				MainForm.SystemConfiguration_0.method_2(string_);
			}
		}
		catch (System.Exception ex)
		{
			this.ilog_0.Error(ex);
		}
	}
	private void backgroundWorker_4_ProgressChanged(object sender, ProgressChangedEventArgs e)
	{
	}
	private void backgroundWorker_4_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
	{
	}
	private void method_36()
	{
		if (this.backgroundWorker_4 != null)
		{
			this.backgroundWorker_4.DoWork -= new DoWorkEventHandler(this.backgroundWorker_4_DoWork);
			this.backgroundWorker_4.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(this.backgroundWorker_4_RunWorkerCompleted);
			this.backgroundWorker_4.ProgressChanged -= new ProgressChangedEventHandler(this.backgroundWorker_4_ProgressChanged);
			this.backgroundWorker_4.CancelAsync();
			this.backgroundWorker_4 = null;
		}
	}
	private void miChangePassword_Click(object sender, System.EventArgs e)
	{
		frmChangePassword frmChangePassword = new frmChangePassword();
		while (frmChangePassword.ShowDialog() == DialogResult.OK)
		{
			if (frmChangePassword.method_0() != RegisterationInfo.gclass2_0.method_6())
			{
				MessageBox.Show("Sai mật khẩu cũ.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
			else
			{
				if (MainForm.SystemConfiguration_0.method_13(RegisterationInfo.gclass2_0, frmChangePassword.method_1()))
				{
					MessageBox.Show("Đổi mật khẩu thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
					return;
				}
				MessageBox.Show("Đổi mật khẩu không thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				break;
			}
		}
	}
	private void miBlackList_Click(object sender, System.EventArgs e)
	{
		frmBlackLists frmBlackLists = new frmBlackLists();
		frmBlackLists.method_1(true);
		frmBlackLists.ShowDialog();
	}
	private void miSpecialList_Click(object sender, System.EventArgs e)
	{
		frmBlackLists frmBlackLists = new frmBlackLists();
		frmBlackLists.method_1(false);
		frmBlackLists.ShowDialog();
	}
	private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
	{
		this.method_33();
	}
	private void dataGridView1_KeyUp(object sender, KeyEventArgs e)
	{
		this.method_33();
	}
	private void miSummaryReport_Click(object sender, System.EventArgs e)
	{
		frmSummaryReports frmSummaryReports = new frmSummaryReports();
		frmSummaryReports.ShowDialog();
	}
	protected override void Dispose(bool disposing)
	{
		if (disposing && this.icontainer_0 != null)
		{
			this.icontainer_0.Dispose();
		}
		base.Dispose(disposing);
	}
	private void InitializeComponent()
	{
        this.components = new System.ComponentModel.Container();
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
        this.menuStrip1 = new System.Windows.Forms.MenuStrip();
        this.msSystem = new System.Windows.Forms.ToolStripMenuItem();
        this.miUserConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
        this.miChangePassword = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
        this.miLogin = new System.Windows.Forms.ToolStripMenuItem();
        this.miLogout = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
        this.miCameraConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miVehicleCamera1Config = new System.Windows.Forms.ToolStripMenuItem();
        this.miVehicleCamera2Config = new System.Windows.Forms.ToolStripMenuItem();
        this.miPanoramaCameraConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miRedLightCameraConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miMotionConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miVehicleCamera1MotionConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miVehicleCamera2MotionConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miRedLightCameraMotionConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.miPanoramaCameraMotionConfig = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
        this.miOption = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
        this.miExit = new System.Windows.Forms.ToolStripMenuItem();
        this.msData = new System.Windows.Forms.ToolStripMenuItem();
        this.miBlackList = new System.Windows.Forms.ToolStripMenuItem();
        this.miSpecialList = new System.Windows.Forms.ToolStripMenuItem();
        this.miVehicle = new System.Windows.Forms.ToolStripMenuItem();
        this.msReport = new System.Windows.Forms.ToolStripMenuItem();
        this.miViolationReport = new System.Windows.Forms.ToolStripMenuItem();
        this.miListDeleted = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
        this.miSummaryReport = new System.Windows.Forms.ToolStripMenuItem();
        this.msHelp = new System.Windows.Forms.ToolStripMenuItem();
        this.miHelp = new System.Windows.Forms.ToolStripMenuItem();
        this.miRegistration = new System.Windows.Forms.ToolStripMenuItem();
        this.miAbout = new System.Windows.Forms.ToolStripMenuItem();
        this.statusStrip1 = new System.Windows.Forms.StatusStrip();
        this.tsCamera1 = new System.Windows.Forms.ToolStripStatusLabel();
        this.tsCamera2 = new System.Windows.Forms.ToolStripStatusLabel();
        this.tsCamera3 = new System.Windows.Forms.ToolStripStatusLabel();
        this.tsCamera4 = new System.Windows.Forms.ToolStripStatusLabel();
        this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
        this.cpuCounterPanel = new System.Windows.Forms.ToolStripStatusLabel();
        this.ramCounterPanel = new System.Windows.Forms.ToolStripStatusLabel();
        this.tsQueue = new System.Windows.Forms.ToolStripStatusLabel();
        this.tsDateTime = new System.Windows.Forms.ToolStripStatusLabel();
        this.panelCamera = new System.Windows.Forms.Panel();
        this.panelRedLightCamera = new System.Windows.Forms.Panel();
        this.panelVehicleCamera2 = new System.Windows.Forms.Panel();
        this.panelPanoramaCamera = new System.Windows.Forms.Panel();
        this.panelVehicleCamera1 = new System.Windows.Forms.Panel();
        this.labelRedLightCamera = new System.Windows.Forms.Label();
        this.groupBox1 = new System.Windows.Forms.GroupBox();
        this.lblRGBInfo = new System.Windows.Forms.Label();
        this.chkRedLightSimulation = new System.Windows.Forms.CheckBox();
        this.picTrafficLight = new System.Windows.Forms.PictureBox();
        this.lblPanoramaCamera = new System.Windows.Forms.Label();
        this.lblVehicleCamera2 = new System.Windows.Forms.Label();
        this.lblVehicleCamera1 = new System.Windows.Forms.Label();
        this.panelResult = new System.Windows.Forms.Panel();
        this.lblRedLightImage = new System.Windows.Forms.Label();
        this.picRedLightImage = new System.Windows.Forms.PictureBox();
        this.label10 = new System.Windows.Forms.Label();
        this.lblVehicleImage = new System.Windows.Forms.Label();
        this.picVehicleImage = new System.Windows.Forms.PictureBox();
        this.picPlateImage = new System.Windows.Forms.PictureBox();
        this.lblPlateNumber = new System.Windows.Forms.Label();
        this.label9 = new System.Windows.Forms.Label();
        this.lblPanoramaImage = new System.Windows.Forms.Label();
        this.picPanoramaImage = new System.Windows.Forms.PictureBox();
        this.dataGridView1 = new System.Windows.Forms.DataGridView();
        this.IDColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.DateColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.TimeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.PlateNumberColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.RecognizeTimeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.VehicleImagePathColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.PanoramaImagePathColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.RedLightImagePathColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
        this.timer_7 = new System.Windows.Forms.Timer(this.components);
        this.menuStrip1.SuspendLayout();
        this.statusStrip1.SuspendLayout();
        this.panelCamera.SuspendLayout();
        this.groupBox1.SuspendLayout();
        ((System.ComponentModel.ISupportInitialize)(this.picTrafficLight)).BeginInit();
        this.panelResult.SuspendLayout();
        ((System.ComponentModel.ISupportInitialize)(this.picRedLightImage)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.picVehicleImage)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.picPlateImage)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.picPanoramaImage)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
        this.SuspendLayout();
        // 
        // menuStrip1
        // 
        resources.ApplyResources(this.menuStrip1, "menuStrip1");
        this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.msSystem,
            this.msData,
            this.msReport,
            this.msHelp});
        this.menuStrip1.Name = "menuStrip1";
        // 
        // msSystem
        // 
        this.msSystem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.miUserConfig,
            this.toolStripSeparator5,
            this.miChangePassword,
            this.toolStripSeparator4,
            this.miLogin,
            this.miLogout,
            this.toolStripSeparator2,
            this.miCameraConfig,
            this.miMotionConfig,
            this.toolStripSeparator3,
            this.miOption,
            this.toolStripSeparator1,
            this.miExit});
        this.msSystem.Name = "msSystem";
        resources.ApplyResources(this.msSystem, "msSystem");
        // 
        // miUserConfig
        // 
        this.miUserConfig.Name = "miUserConfig";
        resources.ApplyResources(this.miUserConfig, "miUserConfig");
        this.miUserConfig.Click += new System.EventHandler(this.miUserConfig_Click);
        // 
        // toolStripSeparator5
        // 
        this.toolStripSeparator5.Name = "toolStripSeparator5";
        resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
        // 
        // miChangePassword
        // 
        this.miChangePassword.Name = "miChangePassword";
        resources.ApplyResources(this.miChangePassword, "miChangePassword");
        this.miChangePassword.Click += new System.EventHandler(this.miChangePassword_Click);
        // 
        // toolStripSeparator4
        // 
        this.toolStripSeparator4.Name = "toolStripSeparator4";
        resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
        // 
        // miLogin
        // 
        this.miLogin.Name = "miLogin";
        resources.ApplyResources(this.miLogin, "miLogin");
        this.miLogin.Click += new System.EventHandler(this.miLogin_Click);
        // 
        // miLogout
        // 
        this.miLogout.Name = "miLogout";
        resources.ApplyResources(this.miLogout, "miLogout");
        this.miLogout.Click += new System.EventHandler(this.miLogout_Click);
        // 
        // toolStripSeparator2
        // 
        this.toolStripSeparator2.Name = "toolStripSeparator2";
        resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
        // 
        // miCameraConfig
        // 
        this.miCameraConfig.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.miVehicleCamera1Config,
            this.miVehicleCamera2Config,
            this.miPanoramaCameraConfig,
            this.miRedLightCameraConfig});
        this.miCameraConfig.Name = "miCameraConfig";
        resources.ApplyResources(this.miCameraConfig, "miCameraConfig");
        // 
        // miVehicleCamera1Config
        // 
        this.miVehicleCamera1Config.Name = "miVehicleCamera1Config";
        resources.ApplyResources(this.miVehicleCamera1Config, "miVehicleCamera1Config");
        this.miVehicleCamera1Config.Click += new System.EventHandler(this.miVehicleCamera1Config_Click);
        // 
        // miVehicleCamera2Config
        // 
        this.miVehicleCamera2Config.Name = "miVehicleCamera2Config";
        resources.ApplyResources(this.miVehicleCamera2Config, "miVehicleCamera2Config");
        this.miVehicleCamera2Config.Click += new System.EventHandler(this.miVehicleCamera2Config_Click);
        // 
        // miPanoramaCameraConfig
        // 
        this.miPanoramaCameraConfig.Name = "miPanoramaCameraConfig";
        resources.ApplyResources(this.miPanoramaCameraConfig, "miPanoramaCameraConfig");
        this.miPanoramaCameraConfig.Click += new System.EventHandler(this.miPanoramaCameraConfig_Click);
        // 
        // miRedLightCameraConfig
        // 
        this.miRedLightCameraConfig.Name = "miRedLightCameraConfig";
        resources.ApplyResources(this.miRedLightCameraConfig, "miRedLightCameraConfig");
        this.miRedLightCameraConfig.Click += new System.EventHandler(this.miRedLightCameraConfig_Click);
        // 
        // miMotionConfig
        // 
        this.miMotionConfig.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.miVehicleCamera1MotionConfig,
            this.miVehicleCamera2MotionConfig,
            this.miRedLightCameraMotionConfig,
            this.miPanoramaCameraMotionConfig});
        this.miMotionConfig.Name = "miMotionConfig";
        resources.ApplyResources(this.miMotionConfig, "miMotionConfig");
        // 
        // miVehicleCamera1MotionConfig
        // 
        this.miVehicleCamera1MotionConfig.Name = "miVehicleCamera1MotionConfig";
        resources.ApplyResources(this.miVehicleCamera1MotionConfig, "miVehicleCamera1MotionConfig");
        this.miVehicleCamera1MotionConfig.Click += new System.EventHandler(this.miVehicleCamera1MotionConfig_Click);
        // 
        // miVehicleCamera2MotionConfig
        // 
        this.miVehicleCamera2MotionConfig.Name = "miVehicleCamera2MotionConfig";
        resources.ApplyResources(this.miVehicleCamera2MotionConfig, "miVehicleCamera2MotionConfig");
        this.miVehicleCamera2MotionConfig.Click += new System.EventHandler(this.miVehicleCamera2MotionConfig_Click);
        // 
        // miRedLightCameraMotionConfig
        // 
        this.miRedLightCameraMotionConfig.Name = "miRedLightCameraMotionConfig";
        resources.ApplyResources(this.miRedLightCameraMotionConfig, "miRedLightCameraMotionConfig");
        this.miRedLightCameraMotionConfig.Click += new System.EventHandler(this.miRedLightCameraMotionConfig_Click);
        // 
        // miPanoramaCameraMotionConfig
        // 
        this.miPanoramaCameraMotionConfig.Name = "miPanoramaCameraMotionConfig";
        resources.ApplyResources(this.miPanoramaCameraMotionConfig, "miPanoramaCameraMotionConfig");
        this.miPanoramaCameraMotionConfig.Click += new System.EventHandler(this.miPanoramaCameraMotionConfig_Click);
        // 
        // toolStripSeparator3
        // 
        this.toolStripSeparator3.Name = "toolStripSeparator3";
        resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
        // 
        // miOption
        // 
        this.miOption.Name = "miOption";
        resources.ApplyResources(this.miOption, "miOption");
        this.miOption.Click += new System.EventHandler(this.miOption_Click);
        // 
        // toolStripSeparator1
        // 
        this.toolStripSeparator1.Name = "toolStripSeparator1";
        resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
        // 
        // miExit
        // 
        this.miExit.Name = "miExit";
        resources.ApplyResources(this.miExit, "miExit");
        this.miExit.Click += new System.EventHandler(this.miExit_Click);
        // 
        // msData
        // 
        this.msData.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.miBlackList,
            this.miSpecialList,
            this.miVehicle});
        this.msData.Name = "msData";
        resources.ApplyResources(this.msData, "msData");
        // 
        // miBlackList
        // 
        this.miBlackList.Name = "miBlackList";
        resources.ApplyResources(this.miBlackList, "miBlackList");
        this.miBlackList.Click += new System.EventHandler(this.miBlackList_Click);
        // 
        // miSpecialList
        // 
        this.miSpecialList.Name = "miSpecialList";
        resources.ApplyResources(this.miSpecialList, "miSpecialList");
        this.miSpecialList.Click += new System.EventHandler(this.miSpecialList_Click);
        // 
        // miVehicle
        // 
        resources.ApplyResources(this.miVehicle, "miVehicle");
        this.miVehicle.Name = "miVehicle";
        this.miVehicle.Click += new System.EventHandler(this.miVehicle_Click);
        // 
        // msReport
        // 
        this.msReport.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.miViolationReport,
            this.miListDeleted,
            this.toolStripSeparator6,
            this.miSummaryReport});
        this.msReport.Name = "msReport";
        resources.ApplyResources(this.msReport, "msReport");
        // 
        // miViolationReport
        // 
        this.miViolationReport.Name = "miViolationReport";
        resources.ApplyResources(this.miViolationReport, "miViolationReport");
        this.miViolationReport.Click += new System.EventHandler(this.miViolationReport_Click);
        // 
        // miListDeleted
        // 
        resources.ApplyResources(this.miListDeleted, "miListDeleted");
        this.miListDeleted.Name = "miListDeleted";
        this.miListDeleted.Click += new System.EventHandler(this.miListDeleted_Click);
        // 
        // toolStripSeparator6
        // 
        this.toolStripSeparator6.Name = "toolStripSeparator6";
        resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
        // 
        // miSummaryReport
        // 
        this.miSummaryReport.Name = "miSummaryReport";
        resources.ApplyResources(this.miSummaryReport, "miSummaryReport");
        this.miSummaryReport.Click += new System.EventHandler(this.miSummaryReport_Click);
        // 
        // msHelp
        // 
        this.msHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.miHelp,
            this.miRegistration,
            this.miAbout});
        this.msHelp.Name = "msHelp";
        resources.ApplyResources(this.msHelp, "msHelp");
        // 
        // miHelp
        // 
        this.miHelp.Name = "miHelp";
        resources.ApplyResources(this.miHelp, "miHelp");
        this.miHelp.Click += new System.EventHandler(this.miHelp_Click);
        // 
        // miRegistration
        // 
        this.miRegistration.Name = "miRegistration";
        resources.ApplyResources(this.miRegistration, "miRegistration");
        this.miRegistration.Click += new System.EventHandler(this.miRegistration_Click);
        // 
        // miAbout
        // 
        this.miAbout.Name = "miAbout";
        resources.ApplyResources(this.miAbout, "miAbout");
        this.miAbout.Click += new System.EventHandler(this.miAbout_Click);
        // 
        // statusStrip1
        // 
        this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tsCamera1,
            this.tsCamera2,
            this.tsCamera3,
            this.tsCamera4,
            this.toolStripStatusLabel2,
            this.cpuCounterPanel,
            this.ramCounterPanel,
            this.tsQueue,
            this.tsDateTime});
        resources.ApplyResources(this.statusStrip1, "statusStrip1");
        this.statusStrip1.Name = "statusStrip1";
        // 
        // tsCamera1
        // 
        this.tsCamera1.Name = "tsCamera1";
        resources.ApplyResources(this.tsCamera1, "tsCamera1");
        // 
        // tsCamera2
        // 
        this.tsCamera2.Name = "tsCamera2";
        resources.ApplyResources(this.tsCamera2, "tsCamera2");
        // 
        // tsCamera3
        // 
        this.tsCamera3.Name = "tsCamera3";
        resources.ApplyResources(this.tsCamera3, "tsCamera3");
        // 
        // tsCamera4
        // 
        this.tsCamera4.Name = "tsCamera4";
        resources.ApplyResources(this.tsCamera4, "tsCamera4");
        // 
        // toolStripStatusLabel2
        // 
        resources.ApplyResources(this.toolStripStatusLabel2, "toolStripStatusLabel2");
        this.toolStripStatusLabel2.ForeColor = System.Drawing.Color.Black;
        this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
        this.toolStripStatusLabel2.Spring = true;
        // 
        // cpuCounterPanel
        // 
        this.cpuCounterPanel.Name = "cpuCounterPanel";
        resources.ApplyResources(this.cpuCounterPanel, "cpuCounterPanel");
        // 
        // ramCounterPanel
        // 
        this.ramCounterPanel.Name = "ramCounterPanel";
        resources.ApplyResources(this.ramCounterPanel, "ramCounterPanel");
        // 
        // tsQueue
        // 
        this.tsQueue.Name = "tsQueue";
        resources.ApplyResources(this.tsQueue, "tsQueue");
        // 
        // tsDateTime
        // 
        this.tsDateTime.Name = "tsDateTime";
        resources.ApplyResources(this.tsDateTime, "tsDateTime");
        // 
        // panelCamera
        // 
        this.panelCamera.BackColor = System.Drawing.SystemColors.Control;
        this.panelCamera.Controls.Add(this.panelRedLightCamera);
        this.panelCamera.Controls.Add(this.panelVehicleCamera2);
        this.panelCamera.Controls.Add(this.panelPanoramaCamera);
        this.panelCamera.Controls.Add(this.panelVehicleCamera1);
        this.panelCamera.Controls.Add(this.labelRedLightCamera);
        this.panelCamera.Controls.Add(this.groupBox1);
        this.panelCamera.Controls.Add(this.lblPanoramaCamera);
        this.panelCamera.Controls.Add(this.lblVehicleCamera2);
        this.panelCamera.Controls.Add(this.lblVehicleCamera1);
        resources.ApplyResources(this.panelCamera, "panelCamera");
        this.panelCamera.Name = "panelCamera";
        // 
        // panelRedLightCamera
        // 
        resources.ApplyResources(this.panelRedLightCamera, "panelRedLightCamera");
        this.panelRedLightCamera.Name = "panelRedLightCamera";
        // 
        // panelVehicleCamera2
        // 
        resources.ApplyResources(this.panelVehicleCamera2, "panelVehicleCamera2");
        this.panelVehicleCamera2.Name = "panelVehicleCamera2";
        // 
        // panelPanoramaCamera
        // 
        resources.ApplyResources(this.panelPanoramaCamera, "panelPanoramaCamera");
        this.panelPanoramaCamera.Name = "panelPanoramaCamera";
        // 
        // panelVehicleCamera1
        // 
        resources.ApplyResources(this.panelVehicleCamera1, "panelVehicleCamera1");
        this.panelVehicleCamera1.Name = "panelVehicleCamera1";
        // 
        // labelRedLightCamera
        // 
        resources.ApplyResources(this.labelRedLightCamera, "labelRedLightCamera");
        this.labelRedLightCamera.ForeColor = System.Drawing.Color.Blue;
        this.labelRedLightCamera.Name = "labelRedLightCamera";
        // 
        // groupBox1
        // 
        this.groupBox1.Controls.Add(this.lblRGBInfo);
        this.groupBox1.Controls.Add(this.chkRedLightSimulation);
        this.groupBox1.Controls.Add(this.picTrafficLight);
        resources.ApplyResources(this.groupBox1, "groupBox1");
        this.groupBox1.Name = "groupBox1";
        this.groupBox1.TabStop = false;
        // 
        // lblRGBInfo
        // 
        resources.ApplyResources(this.lblRGBInfo, "lblRGBInfo");
        this.lblRGBInfo.Name = "lblRGBInfo";
        // 
        // chkRedLightSimulation
        // 
        resources.ApplyResources(this.chkRedLightSimulation, "chkRedLightSimulation");
        this.chkRedLightSimulation.Name = "chkRedLightSimulation";
        this.chkRedLightSimulation.UseVisualStyleBackColor = true;
        this.chkRedLightSimulation.CheckedChanged += new System.EventHandler(this.chkRedLightSimulation_CheckedChanged);
        // 
        // picTrafficLight
        // 
        this.picTrafficLight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        this.picTrafficLight.Image = global::Properties.Resources.Green;
        resources.ApplyResources(this.picTrafficLight, "picTrafficLight");
        this.picTrafficLight.Name = "picTrafficLight";
        this.picTrafficLight.TabStop = false;
        // 
        // lblPanoramaCamera
        // 
        resources.ApplyResources(this.lblPanoramaCamera, "lblPanoramaCamera");
        this.lblPanoramaCamera.ForeColor = System.Drawing.Color.Blue;
        this.lblPanoramaCamera.Name = "lblPanoramaCamera";
        // 
        // lblVehicleCamera2
        // 
        resources.ApplyResources(this.lblVehicleCamera2, "lblVehicleCamera2");
        this.lblVehicleCamera2.ForeColor = System.Drawing.Color.Blue;
        this.lblVehicleCamera2.Name = "lblVehicleCamera2";
        // 
        // lblVehicleCamera1
        // 
        resources.ApplyResources(this.lblVehicleCamera1, "lblVehicleCamera1");
        this.lblVehicleCamera1.ForeColor = System.Drawing.Color.Blue;
        this.lblVehicleCamera1.Name = "lblVehicleCamera1";
        // 
        // panelResult
        // 
        this.panelResult.Controls.Add(this.lblRedLightImage);
        this.panelResult.Controls.Add(this.picRedLightImage);
        this.panelResult.Controls.Add(this.label10);
        this.panelResult.Controls.Add(this.lblVehicleImage);
        this.panelResult.Controls.Add(this.picVehicleImage);
        this.panelResult.Controls.Add(this.picPlateImage);
        this.panelResult.Controls.Add(this.lblPlateNumber);
        this.panelResult.Controls.Add(this.label9);
        this.panelResult.Controls.Add(this.lblPanoramaImage);
        this.panelResult.Controls.Add(this.picPanoramaImage);
        this.panelResult.Controls.Add(this.dataGridView1);
        resources.ApplyResources(this.panelResult, "panelResult");
        this.panelResult.Name = "panelResult";
        // 
        // lblRedLightImage
        // 
        resources.ApplyResources(this.lblRedLightImage, "lblRedLightImage");
        this.lblRedLightImage.ForeColor = System.Drawing.Color.Blue;
        this.lblRedLightImage.Name = "lblRedLightImage";
        // 
        // picRedLightImage
        // 
        this.picRedLightImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        resources.ApplyResources(this.picRedLightImage, "picRedLightImage");
        this.picRedLightImage.Name = "picRedLightImage";
        this.picRedLightImage.TabStop = false;
        this.picRedLightImage.DoubleClick += new System.EventHandler(this.picRedLightImage_DoubleClick);
        // 
        // label10
        // 
        resources.ApplyResources(this.label10, "label10");
        this.label10.ForeColor = System.Drawing.Color.Blue;
        this.label10.Name = "label10";
        // 
        // lblVehicleImage
        // 
        resources.ApplyResources(this.lblVehicleImage, "lblVehicleImage");
        this.lblVehicleImage.ForeColor = System.Drawing.Color.Blue;
        this.lblVehicleImage.Name = "lblVehicleImage";
        // 
        // picVehicleImage
        // 
        this.picVehicleImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        resources.ApplyResources(this.picVehicleImage, "picVehicleImage");
        this.picVehicleImage.Name = "picVehicleImage";
        this.picVehicleImage.TabStop = false;
        this.picVehicleImage.DoubleClick += new System.EventHandler(this.picVehicleImage_DoubleClick);
        // 
        // picPlateImage
        // 
        this.picPlateImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        resources.ApplyResources(this.picPlateImage, "picPlateImage");
        this.picPlateImage.Name = "picPlateImage";
        this.picPlateImage.TabStop = false;
        // 
        // lblPlateNumber
        // 
        this.lblPlateNumber.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        resources.ApplyResources(this.lblPlateNumber, "lblPlateNumber");
        this.lblPlateNumber.Name = "lblPlateNumber";
        // 
        // label9
        // 
        resources.ApplyResources(this.label9, "label9");
        this.label9.ForeColor = System.Drawing.Color.Blue;
        this.label9.Name = "label9";
        // 
        // lblPanoramaImage
        // 
        resources.ApplyResources(this.lblPanoramaImage, "lblPanoramaImage");
        this.lblPanoramaImage.ForeColor = System.Drawing.Color.Blue;
        this.lblPanoramaImage.Name = "lblPanoramaImage";
        // 
        // picPanoramaImage
        // 
        this.picPanoramaImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        resources.ApplyResources(this.picPanoramaImage, "picPanoramaImage");
        this.picPanoramaImage.Name = "picPanoramaImage";
        this.picPanoramaImage.TabStop = false;
        this.picPanoramaImage.DoubleClick += new System.EventHandler(this.picPanoramaImage_DoubleClick);
        // 
        // dataGridView1
        // 
        this.dataGridView1.AllowUserToAddRows = false;
        this.dataGridView1.AllowUserToDeleteRows = false;
        this.dataGridView1.AllowUserToResizeRows = false;
        resources.ApplyResources(this.dataGridView1, "dataGridView1");
        this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
        this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
        this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.IDColumn,
            this.DateColumn,
            this.TimeColumn,
            this.PlateNumberColumn,
            this.RecognizeTimeColumn,
            this.VehicleImagePathColumn,
            this.PanoramaImagePathColumn,
            this.RedLightImagePathColumn});
        this.dataGridView1.Name = "dataGridView1";
        this.dataGridView1.ReadOnly = true;
        this.dataGridView1.RowHeadersVisible = false;
        this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
        this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
        this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown);
        this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
        this.dataGridView1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyUp);
        // 
        // IDColumn
        // 
        resources.ApplyResources(this.IDColumn, "IDColumn");
        this.IDColumn.Name = "IDColumn";
        this.IDColumn.ReadOnly = true;
        this.IDColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
        // 
        // DateColumn
        // 
        resources.ApplyResources(this.DateColumn, "DateColumn");
        this.DateColumn.Name = "DateColumn";
        this.DateColumn.ReadOnly = true;
        this.DateColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
        // 
        // TimeColumn
        // 
        resources.ApplyResources(this.TimeColumn, "TimeColumn");
        this.TimeColumn.Name = "TimeColumn";
        this.TimeColumn.ReadOnly = true;
        this.TimeColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
        // 
        // PlateNumberColumn
        // 
        resources.ApplyResources(this.PlateNumberColumn, "PlateNumberColumn");
        this.PlateNumberColumn.Name = "PlateNumberColumn";
        this.PlateNumberColumn.ReadOnly = true;
        this.PlateNumberColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
        // 
        // RecognizeTimeColumn
        // 
        this.RecognizeTimeColumn.FillWeight = 120F;
        resources.ApplyResources(this.RecognizeTimeColumn, "RecognizeTimeColumn");
        this.RecognizeTimeColumn.Name = "RecognizeTimeColumn";
        this.RecognizeTimeColumn.ReadOnly = true;
        this.RecognizeTimeColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
        // 
        // VehicleImagePathColumn
        // 
        resources.ApplyResources(this.VehicleImagePathColumn, "VehicleImagePathColumn");
        this.VehicleImagePathColumn.Name = "VehicleImagePathColumn";
        this.VehicleImagePathColumn.ReadOnly = true;
        // 
        // PanoramaImagePathColumn
        // 
        resources.ApplyResources(this.PanoramaImagePathColumn, "PanoramaImagePathColumn");
        this.PanoramaImagePathColumn.Name = "PanoramaImagePathColumn";
        this.PanoramaImagePathColumn.ReadOnly = true;
        // 
        // RedLightImagePathColumn
        // 
        resources.ApplyResources(this.RedLightImagePathColumn, "RedLightImagePathColumn");
        this.RedLightImagePathColumn.Name = "RedLightImagePathColumn";
        this.RedLightImagePathColumn.ReadOnly = true;
        // 
        // timer_7
        // 
        this.timer_7.Enabled = true;
        this.timer_7.Interval = 1000;
        this.timer_7.Tick += new System.EventHandler(this.timer_7_Tick);
        // 
        // MainForm
        // 
        resources.ApplyResources(this, "$this");
        this.Controls.Add(this.panelResult);
        this.Controls.Add(this.panelCamera);
        this.Controls.Add(this.statusStrip1);
        this.Controls.Add(this.menuStrip1);
        this.Name = "MainForm";
        this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
        this.Load += new System.EventHandler(this.MainForm_Load);
        this.menuStrip1.ResumeLayout(false);
        this.menuStrip1.PerformLayout();
        this.statusStrip1.ResumeLayout(false);
        this.statusStrip1.PerformLayout();
        this.panelCamera.ResumeLayout(false);
        this.panelCamera.PerformLayout();
        this.groupBox1.ResumeLayout(false);
        this.groupBox1.PerformLayout();
        ((System.ComponentModel.ISupportInitialize)(this.picTrafficLight)).EndInit();
        this.panelResult.ResumeLayout(false);
        this.panelResult.PerformLayout();
        ((System.ComponentModel.ISupportInitialize)(this.picRedLightImage)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.picVehicleImage)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.picPlateImage)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.picPanoramaImage)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
        this.ResumeLayout(false);
        this.PerformLayout();

	}
}
